package com.github.kotvertolet.youtubejextractor.models.newModels;

import com.google.gson.annotations.SerializedName;
import ohos.utils.Parcel;
import ohos.utils.Sequenceable;

import java.io.Serializable;

/**
 * 类功能描述(类上)
 *
 * @author AnBetter
 * @since 2021-04-16
 */
public class MessagesItem implements Sequenceable, Serializable {
    @SerializedName("mealbarPromoRenderer")
    private MealbarPromoRenderer mealbarPromoRenderer;

    public static final Sequenceable.Producer<MessagesItem> CREATOR = new Producer<MessagesItem>() {
        @Override
        public MessagesItem createFromParcel(Parcel parcel) {
            // Initialize an instance first, then do customized unmarshlling.
            MessagesItem messagesItem = new MessagesItem();
            messagesItem.unmarshalling(parcel);
            return messagesItem;
        }
    };

    @Override
    public boolean marshalling(Parcel parcel) {
        parcel.writeSequenceable(this.mealbarPromoRenderer);
        return true;
    }

    @Override
    public boolean unmarshalling(Parcel parcel) {
        parcel.readSequenceable(this.mealbarPromoRenderer);
        return true;
    }

    @Override
    public String toString() {
        return "MessagesItem{" +
                "mealbarPromoRenderer = '" + mealbarPromoRenderer + '\'' +
                "}";
    }

    public MealbarPromoRenderer getMealbarPromoRenderer() {
        return mealbarPromoRenderer;
    }

    public void setMealbarPromoRenderer(MealbarPromoRenderer mealbarPromoRenderer) {
        this.mealbarPromoRenderer = mealbarPromoRenderer;
    }
}
